{extends file="../acp.html"}

{block name="title"}{$head_title}{/block}
{block name="content"}
<script>
    function no_pic(obj) {
        obj.setAttribute("src", "/Public/Images/acp/nopicture.jpg");
    }
</script>

<div class="tablesWrap">

    <!-- end tables-searchbox -->
    <table class="wxtables">
        <colgroup>
            <!-- <col width="7%"> -->
            <col width="11%">
            <col width="12%">
            <col width="19%">
        </colgroup>
        <thead>
        <tr>
            <!-- <td>选择</td> -->
            <td>帖子类型</td>
            <td>帖子分成</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr>
            <!-- <td><input type="checkbox" class="checkbox" value="{$incubator.incubator_id}" name="checkIds[]"></td> -->
            <td>普通贴</td>
            <td>
                <input type="text" name="post_ordinary" value="">
            </td>
            <td>
                <a href="javascript:;" onclick="sele_post(4,post_ordinary);" class="btn" title="保存"><i class="gicon-trash black"></i>保存</a>
            </td>
        </tr>
        <tr>
            <!-- <td><input type="checkbox" class="checkbox" value="{$incubator.incubator_id}" name="checkIds[]"></td> -->
            <td>赞赏贴</td>
            <td>
                <input type="text" name="post_appreciate" value="">
            </td>
            <td>
                <a href="javascript:;" onclick="sele_post(2,post_appreciate);" class="btn" title="保存"><i class="gicon-trash black"></i>保存</a>
            </td>
        </tr>
        <tr>
            <!-- <td><input type="checkbox" class="checkbox" value="{$incubator.incubator_id}" name="checkIds[]"></td> -->
            <td>众筹贴</td>
            <td>
                <input type="text" name="post_crowdfunding" value="">
            </td>
            <td>
                <a href="javascript:;" onclick="sele_post(3,post_crowdfunding);" class="btn" title="保存"><i class="gicon-trash black"></i>保存</a>
            </td>
        </tr>
        <tr>
            <!-- <td><input type="checkbox" class="checkbox" value="{$incubator.incubator_id}" name="checkIds[]"></td> -->
            <td>悬赏贴</td>
            <td>
                <input type="text" name="post_offer_reward" value="">
            </td>
            <td>
                <a href="javascript:;" onclick="sele_post(1,post_offer_reward);" class="btn" title="保存"><i class="gicon-trash black"></i>保存</a>
            </td>
        </tr>
        </tbody>
    </table>
    <!-- end wxtables -->
    <div class="tables-btmctrl clearfix">
        <!-- <div class="fl">
            <a href="javascript:selall()" class="btn btn-blue">全选</a>
            <a href="javascript:clearall()" class="btn btn-blue">取消</a>
            <a href="javascript:;" class="btn btn-blue J_batch_store">下架</a>
            <a href="javascript:;" class="btn btn-blue" onclick="delIncubatorBatch()">删除</a>
        </div> -->
        <div class="fr">
            <div class="paginate">
                {$show}
            </div>
            <!-- end paginate -->
        </div>
    </div>
    <!-- end tables-btmctrl -->
</div>
<!-- end tablesWrap -->
{/block}

{block name="js"}
<script src="/Public/Plugins/My97DatePicker/WdatePicker.js?version={$version}"></script>
<script src="__JS__/front/jquery.showLoading.min.js?version={$version}"></script>
<script src="__JS__/clipboard.min.js"></script>
<link rel="stylesheet" href="__CSS__/front/showLoading.css?version={$version}">
{literal}
<script>
    function sele_post(post_type,name)
    {
        var html = "确认修改这个帖子吗?";
        var 
        $.jPops.custom({
            title:"修改帖子",
            content:html,
            okBtnTxt:"确定",
            cancelBtnTxt:"取消",
            callback:function(r)
            {
                if(r)
                {
                    $.post('/AcpPost/sele_post_type',{'post_type':post_type},function(data) {
                        console.log(data)
                        if (data == 'success') {
                            alert('修改成功');
                            location.reload();
                        } else {
                            alert('修改失败，请稍后再试');
                        }
                    });
                }
                return true;
            }
        });
    }

</script>
{/literal}
{/block}
